﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Loki.UI.Win;

namespace Loki.UI.Win
{
	public class FormattedFormNameConverter : IMultiValueConverter
	{
		public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
		{
			bool L_IsDirty = System.Convert.ToBoolean(values[0]);
			object[] L_Values = values.Skip(1).ToArray();
			if (L_IsDirty)
				return string.Format(culture, parameter.ToString() + " *", L_Values);
			else
				return string.Format(culture, parameter.ToString(), L_Values);
		}

		public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
		{
			throw new NotImplementedException();
		}

	}
}
